//点击再逛逛 跳转首页
axios.defaults.baseURL = 'http://cba.itlike.com/public/index.php?s=/api/'

document.querySelector('.btn').addEventListener('click',function () {
    location.href = 'index.html'
})

async function render() {
  const res = await axios.get('/cart/list', {
    headers: {
      'Access-Token': localStorage.getItem('token'),
      platform:'H5'
    }
  })
  console.log(res)
}
render()









// 底部导航点击跳转
// 跳转页面
const li = document.querySelectorAll('.footer li')
for (let i = 0; i < li.length; i++) {
  li[i].addEventListener('click', function () {
    document.querySelector('.footer li.active').classList.remove('active')
    li[i].classList.add('active')
  })
}
li[0].addEventListener('click', function () {
  location.href = 'index.html'
})
li[1].addEventListener('click', function () {
  location.href = 'classify.html'
})
li[2].addEventListener('click',function () {
  location.href = 'shopcar.html'
})
li[3].addEventListener('click',function () {
  location.href = 'register.html'
})
